package com.xzk.consumer.client;

import com.xzk.consumer.config.FeignConfig;
import com.xzk.consumer.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Classname UserClient
 * @Description TODO
 * @Date 2020/9/23 12:31
 * @Created by ccc-j
 * @email ccc-ju@outlook.com
 */
@FeignClient(value = "user-service", fallback = UserClientFallback.class, configuration = FeignConfig.class)
public interface UserClient {

    //http://user-service/user/{id}
    @GetMapping("/user/{id}")
    public User queryById(@PathVariable Long id);

}
